kurssien_maara = ENV['kursseja'].to_i

kurssien_maara = 15 unless kurssien_maara

Course.delete_all if ENV['delete']

kurssien_maara.times do |i|
  Course.create :name => "kurssi #{i}"
end

Course.all.each do |c|
  c.course_instances.create :name => "Syksy 2009"
  c.course_instances.create :name => "Kevaet 2010"
end

CourseInstance.all.each do |ci|
  5.times do |i|
    ci.exercise_groups.create :name => "Ryhmae #{i}", :timeday => "Maanantai klo. 14:00", :teacher => "Olli Opettaja"
  end
end